import java.util.*;
class EBill{
    public static void main(String args[]){
        int units;
        double billtopay = 0;
        Scanner sc = new Scanner(System.in);
		System.out.println("Enter Units to Generate Bill: ");
        units = sc.nextInt();
        if (units < 150){
            billtopay = units*5.50;
        }
        else if(units < 300){
            billtopay = 150*5.50 + (units - 150)*6;
        }
        else if(units > 300){
            billtopay = 150*5.50 + 150*6 + (units - 300)*6.50;
        }
        System.out.println("The electricity bill for "+units+" is: " + billtopay);
    }
}